package com.x.client.bean

import android.os.Parcel
import android.os.Parcelable
import com.google.gson.annotations.SerializedName

/**
 * Creator : GG
 * Date    : 2018/1/8
 * Mail    : gg.jin.yu@gmai.com
 * Explain :
 */
data class AccountPropertyMap(
        @SerializedName("accountName") var accountName: String? = "", //77777777777
        @SerializedName("shopId") var shopId: String? = "", //17112116593780394153324717287515
        @SerializedName("userId") var userId: String? = "", //17112116593786170155429665776756
        @SerializedName("marketId") var marketId: String? = "" //138
) : Parcelable {
    constructor(source: Parcel) : this(
            source.readString(),
            source.readString(),
            source.readString(),
            source.readString()
    )

    override fun describeContents() = 0

    override fun writeToParcel(dest: Parcel, flags: Int) = with(dest) {
        writeString(accountName)
        writeString(shopId)
        writeString(userId)
        writeString(marketId)
    }

    companion object {
        @JvmField
        val CREATOR: Parcelable.Creator<AccountPropertyMap> = object : Parcelable.Creator<AccountPropertyMap> {
            override fun createFromParcel(source: Parcel): AccountPropertyMap = AccountPropertyMap(source)
            override fun newArray(size: Int): Array<AccountPropertyMap?> = arrayOfNulls(size)
        }
    }
}